package pl.przewozy;

import junit.framework.Assert;
import junit.framework.TestCase;

/**
 * Created by lnowak on 31.10.13.
 */
public class ScheduleTest extends TestCase {
    public void setUp() throws Exception {
        super.setUp();

    }

    public void tearDown() throws Exception {

    }


    public void testParseToTags() throws Exception {
        Schedule sut = new Schedule("1|2|3|4|5|");
        assertEquals("1",sut.trainNo);
        assertEquals("2",sut.destination);
        assertEquals("3",sut.delay);
        assertEquals("4",sut.nearBy);
        assertEquals("5",sut.updateTime);
    }

    public void testParseToTagsWithSpace() throws Exception {
        Schedule sut = new Schedule("1|2|3|4|5 5|");
        assertEquals("1",sut.trainNo);
        assertEquals("2",sut.destination);
        assertEquals("3",sut.delay);
        assertEquals("4",sut.nearBy);
        assertEquals("5",sut.updateTime);
    }
}
